package com.zany.net.service;

import com.google.gson.JsonObject;
import com.zany.net.dto.request.RequestEntity;
import com.zany.net.dto.response.ResponseEntity;

public interface NetService {
    String HEADER = "header";

    String MSGCD = "msgcd";

    String BODY = "body";

    ResponseEntity handler(String jsonStr);


    /**
     * 处理请求实体，并返回响应实体.
     * @param requestEntity
     * @return ResponseEntity.
     */
    ResponseEntity handler(RequestEntity requestEntity);


    /**
     * 对json对象进行解析成实体对象.
     * @param jsonObject
     * @return
     */
    RequestEntity convert(JsonObject jsonObject);
}
